import { NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core';
import { CommonModule } from '@angular/common';

import { FormsModule } from '@angular/forms';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { PropertyGridComponent } from './property-grid/property-grid.component';
import { SharedPropertyDetailComponent } from './property-detail/property-detail.component';
import { ProjectGridComponent } from './project-grid/project-grid.component';
import { ProjectDetailComponent } from './project-detail/project-detail.component';
import { SharedComponent } from './shared.component';
import { SharedPropertyRoutingModule } from './shared-routing.module';
//ngx-bootstrap
import { ScrollToModule } from 'ng2-scroll-to';
import { CarouselModule } from 'ngx-bootstrap';
//primeng
import { PanelModule } from 'primeng/panel';
import { InputSwitchModule } from 'primeng/inputswitch';
import { InputTextModule } from 'primeng/inputtext';
import { MessageService } from 'primeng/components/common/messageservice';
import { SpinnerModule } from 'primeng/spinner';
import { DragDropModule } from 'primeng/dragdrop';
import { TableModule } from 'primeng/table';
import { MultiSelectModule } from 'primeng/multiselect';
import { DropdownModule } from 'primeng/dropdown';
import { ConfirmDialogModule } from 'primeng/confirmdialog';
import { GMapModule } from 'primeng/gmap';
import { TooltipModule } from 'primeng/tooltip';
import { ScrollPanelModule } from 'primeng/scrollpanel';
import { StepsModule } from 'primeng/steps';
import { MessagesModule } from 'primeng/messages';
import { MessageModule } from 'primeng/message';


import { ConfirmationService } from 'primeng/api';
import { GrowlModule } from 'primeng/growl';
import { GalleriaModule } from 'primeng/galleria';
import { TreeTableModule } from 'primeng/treetable';
import { TabViewModule } from 'primeng/tabview';
import { EditorModule } from 'primeng/editor';
import { RadioButtonModule } from 'primeng/radiobutton';
import { CalendarModule } from 'primeng/calendar';
import { FileUploadModule } from 'primeng/fileupload';
import { DialogModule } from 'primeng/dialog';
import { InputTextareaModule } from 'primeng/inputtextarea';
import { OrganizationChartModule } from 'primeng/organizationchart';
import { AbmModule } from 'angular-baidu-maps';
import { AgmCoreModule } from '@agm/core';
import { PropertyService } from './service/property.service';
import { ProjectDetailViewComponent } from './project-detail/project-detail-view/project-detail-view.component';
import { ProjectDetailEditComponent } from './project-detail/project-detail-edit/project-detail-edit.component';
import { PropertyDetailResourcesComponent } from './property-detail/property-detail-resources/property-detail-resources.component';
import { PropertyDetailHouseEditComponent } from './property-detail/property-detail-house-edit/property-detail-house-edit.component';
import { PropertyDetailHouseViewComponent } from './property-detail/property-detail-house-view/property-detail-house-view.component';
import { PropertyManagementComponent } from './property-management/property-management.component';
import { SalesRecordComponent } from './sales-record/sales-record.component';
import { CustomerPropertyManagementComponent } from './customer-property-management/customer-property-management.component';
import { CustomerPropertyListComponent } from './customer-property-list/customer-property-list.component';
import { SubagentKpiComponent } from './subagent-kpi/subagent-kpi.component';
import { SharedModule } from 'primeng/components/common/shared';
import { TranslateModule } from '@ngx-translate/core';
import { TabMenuModule } from 'primeng/tabmenu';
import { UserProfileComponent } from './user-profile/user-profile.component';
import { MapviewComponent } from './mapview/mapview.component';
import { SettingsComponent } from './settings/settings.component';
import { DeviceDetectorModule } from 'ngx-device-detector';
import { FindListingFilter } from './findListingFilter.pipe';
import { SaleNotificationComponent } from './sale-notification/sale-notification.component';




@NgModule({
  imports: [
    CommonModule,
    SharedPropertyRoutingModule,
    FormsModule,
    NgbModule.forRoot(),
    TranslateModule,
    //ngx-bootstrap
    ScrollToModule.forRoot(),
    CarouselModule.forRoot(),
    AbmModule.forRoot({
      apiKey: '7b788c5ea45cc4b3ac6331a4b0643d5b' // app key为必选项
    }),
    AgmCoreModule.forRoot({
      apiKey: 'AIzaSyATB-mHVMq8I8Ag9Gkv3MiVa999VUc_FrM'
    }),
    GMapModule,
    DeviceDetectorModule.forRoot(),
    //primeng
    FileUploadModule,
    PanelModule,
    InputSwitchModule,
    InputTextModule,
    EditorModule,
    SpinnerModule,
    DragDropModule,
    TableModule,
    MultiSelectModule,
    DropdownModule,
    ConfirmDialogModule,
    GrowlModule,
    TabViewModule,
    GalleriaModule,
    CalendarModule,
    RadioButtonModule,
    TreeTableModule,
    SharedModule,
    DialogModule,
    InputTextareaModule,
    OrganizationChartModule,
    TabMenuModule,
    TooltipModule,
    ScrollPanelModule,
    StepsModule,
    MessagesModule,
    MessageModule,
  ],
  providers: [
    ConfirmationService,
    MessageService,
    PropertyService
  ],
  schemas: [
    CUSTOM_ELEMENTS_SCHEMA,
    NO_ERRORS_SCHEMA
  ],

  exports: [
    SharedComponent,
    PropertyGridComponent,
    SharedPropertyDetailComponent,
    PropertyDetailHouseEditComponent,
    PropertyDetailHouseViewComponent,
    PropertyDetailResourcesComponent,
    ProjectGridComponent,
    ProjectDetailComponent,
    ProjectDetailViewComponent,
    ProjectDetailEditComponent,
    PropertyManagementComponent,
    SalesRecordComponent,
    CustomerPropertyListComponent,
    CustomerPropertyManagementComponent,
    SubagentKpiComponent,
    UserProfileComponent,
    MapviewComponent,
    SettingsComponent,
    FindListingFilter,
    SaleNotificationComponent
  ],
  declarations: [
    SharedComponent,
    PropertyGridComponent,
    SharedPropertyDetailComponent,
    PropertyDetailHouseEditComponent,
    PropertyDetailHouseViewComponent,
    PropertyDetailResourcesComponent,
    ProjectGridComponent,
    ProjectDetailComponent,
    ProjectDetailViewComponent,
    ProjectDetailEditComponent,
    PropertyManagementComponent,
    SalesRecordComponent,
    CustomerPropertyListComponent,
    CustomerPropertyManagementComponent,
    SubagentKpiComponent,
    UserProfileComponent,
    MapviewComponent,
    SettingsComponent,
    FindListingFilter,
    SaleNotificationComponent
  ],
})
export class SharedResourceModule { }
